package Server;

import java.io.DataInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.Socket;

public class Mythread extends Thread {
    private Socket socket;
    public Mythread(Socket socket) {
        this.socket = socket;
    }
    @Override
    public void run() {

            try {
                DataInputStream dis = new DataInputStream(socket.getInputStream());
                int type= dis.readInt();
                switch (type) {
                    case 1:
                        break;
                    case 2:
                        break;
                    case 3:
                        break;
                }
            } catch (Exception e) {
//                e.printStackTrace();
                System.out.println("客户端下线了，ip："+socket.getInetAddress().getHostAddress());
//                socket.close(socket);
            }


        // Do something with the socket here
    }
}
